import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    //在项目启动的时候，直接回默认访问/，并且重定向到/登录路由地址
    redirect: '/login',
  },
  {
    path: '/login',
    name: 'login',
    component: () => import( '../views/Login')
  },
  {
    path: '/home',
    name: 'home',
    component: () => import( '../views/home')
  }

  
]

const router = new VueRouter({
  routes
})

export default router
